/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Objects;

import Tools.Tools;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author Personal
 */
public class Reason {
    private int idReason;
    private String nombre;
    private String abrev;     
    private int valDev;
    private int status;
    /**
     * 
     */
    public Reason(){
        
    }

    /**
     * 
     * @param rs 
     */
    public Reason(ResultSet rs){
        try{
            idReason        = rs.getInt(1);
            nombre          = rs.getString(2);
            abrev           = rs.getString(3);
            valDev          = rs.getInt(4);
            status          = rs.getInt(5);
            
        }catch(SQLException e){
            Tools.getErrorMessage(e.getStackTrace(),e.getMessage());
        }
    }

    /**
     * @return the idReason
     */
    public int getIdReason() {
        return idReason;
    }

    /**
     * @param idReason the idReason to set
     */
    public void setIdReason(int idReason) {
        this.idReason = idReason;
    }

    /**
     * @return the nombre
     */
    public String getNombre() {
        return nombre;
    }

    /**
     * @param nombre the nombre to set
     */
    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    /**
     * @return the abrev
     */
    public String getAbrev() {
        return abrev;
    }

    /**
     * @param abrev the abrev to set
     */
    public void setAbrev(String abrev) {
        this.abrev = abrev;
    }

    /**
     * @return the status
     */
    public int getStatus() {
        return status;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(int status) {
        this.status = status;
    }
    
    /**
     * @return the valDev
     */
    public int getValDev() {
        return valDev;
    }

    /**
     * @param valDev the valDev to set
     */
    public void setValDev(int valDev) {
        this.valDev = valDev;
    }
    
    /**
     * 
     * @return 
     */
    @Override
    public String toString(){
        return this.abrev + " / " + this.nombre ;
    }

}
